<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="robots" content="noodp" />
        <title>像素刻度尺 - 欢迎来到SY的博客</title><meta name="description" content="像素刻度尺"><meta property="og:title" content="像素刻度尺" />
<meta property="og:description" content="像素刻度尺" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://acking-you.gitee.io/posts/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA/" /><meta property="og:image" content="https://acking-you.gitee.io/logo.png"/><meta property="article:section" content="posts" />
<meta property="article:published_time" content="2022-08-27T00:00:00+00:00" />
<meta property="article:modified_time" content="2022-08-27T00:00:00+00:00" />

<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://acking-you.gitee.io/logo.png"/>

<meta name="twitter:title" content="像素刻度尺"/>
<meta name="twitter:description" content="像素刻度尺"/>
<meta name="application-name" content="FeelIt">
<meta name="apple-mobile-web-app-title" content="FeelIt"><meta name="theme-color" content="#ffffff"><meta name="msapplication-TileColor" content="#da532c"><link rel="canonical" href="https://acking-you.gitee.io/posts/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA/" /><link rel="prev" href="https://acking-you.gitee.io/posts/%C3%A6%C3%A4%C3%A5%C3%A9/" /><link rel="next" href="https://acking-you.gitee.io/posts/%C3%A6%C3%A8%C3%A4%C2%AA%C3%A8%C3%A7/" /><link rel="stylesheet" href="/css/page.min.css"><link rel="stylesheet" href="/css/home.min.css"><script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "BlogPosting",
        "headline": "像素刻度尺",
        "inLanguage": "zh-CN",
        "mainEntityOfPage": {
            "@type": "WebPage",
            "@id": "https:\/\/acking-you.gitee.io\/posts\/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA\/"
        },"genre": "posts","keywords": "像素刻度尺","wordcount":  762 ,
        "url": "https:\/\/acking-you.gitee.io\/posts\/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA\/","datePublished": "2022-08-27T00:00:00+00:00","dateModified": "2022-08-27T00:00:00+00:00","publisher": {
            "@type": "Organization",
            "name": "作者"},"author": {
                "@type": "Person",
                "name": "作者"
            },"description": "像素刻度尺"
    }
    </script></head><body data-header-desktop="auto" data-header-mobile="auto"><script>(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('auto' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : 'auto' === 'dark')) && document.body.setAttribute('theme', 'dark');</script>

        <div id="mask"></div><div class="wrapper"><header class="desktop" id="header-desktop">
    <div class="header-wrapper">
        <div class="header-title">
            <a href="/" title="欢迎来到SY的博客">欢迎来到SY的博客</a>
        </div>
        <div class="menu">
            <div class="menu-inner"><a class="menu-item" href="/posts/"> 文章 </a><a class="menu-item" href="/tags/"> 标签 </a><a class="menu-item" href="/categories/"> 分类 </a><span class="menu-item delimiter"></span><span class="menu-item search" id="search-desktop">
                        <input type="text" placeholder="搜索文章标题或内容..." id="search-input-desktop">
                        <a href="#" class="search-button search-toggle" id="search-toggle-desktop" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="#" class="search-button search-clear" id="search-clear-desktop" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-desktop">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </span><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                    <i class="fas fa-adjust fa-fw"></i>
                </a>
            </div>
        </div>
    </div>
</header><header class="mobile" id="header-mobile">
    <div class="header-container">
        <div class="header-wrapper">
            <div class="header-title">
                <a href="/" title="欢迎来到SY的博客">欢迎来到SY的博客</a>
            </div>
            <div class="menu-toggle" id="menu-toggle-mobile">
                <span></span><span></span><span></span>
            </div>
        </div>
        <div class="menu" id="menu-mobile"><div class="search-wrapper">
                    <div class="search mobile" id="search-mobile">
                        <input type="text" placeholder="搜索文章标题或内容..." id="search-input-mobile">
                        <a href="#" class="search-button search-toggle" id="search-toggle-mobile" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="#" class="search-button search-clear" id="search-clear-mobile" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-mobile">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </div>
                    <a href="#" class="search-cancel" id="search-cancel-mobile">
                        取消
                    </a>
                </div><a class="menu-item" href="/posts/" title="">文章</a><a class="menu-item" href="/tags/" title="">标签</a><a class="menu-item" href="/categories/" title="">分类</a><div class="menu-item"><a href="javascript:void(0);" class="theme-switch" title="切换主题">
                    <i class="fas fa-adjust fa-fw"></i>
                </a>
            </div></div>
    </div>
</header><div class="search-dropdown desktop">
    <div id="search-dropdown-desktop"></div>
</div>
<div class="search-dropdown mobile">
    <div id="search-dropdown-mobile"></div>
</div><main class="main">
                <div class="container"><div class="toc" id="toc-auto">
            <h2 class="toc-title">目录</h2>
            <div class="toc-content" id="toc-content-auto"></div>
        </div><article class="page single" data-toc="disable"><div class="featured-image"><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://w.wallhaven.cc/full/dg/wallhaven-dgv23j.png"
        data-srcset="https://w.wallhaven.cc/full/dg/wallhaven-dgv23j.png, https://w.wallhaven.cc/full/dg/wallhaven-dgv23j.png 1.5x, https://w.wallhaven.cc/full/dg/wallhaven-dgv23j.png 2x"
        data-sizes="auto"
        alt="https://w.wallhaven.cc/full/dg/wallhaven-dgv23j.png"
        title="像素刻度尺" /></div><div class="single-card" data-image="true"><h2 class="single-title animated flipInX">像素刻度尺</h2><div class="post-meta">
                <div class="post-meta-line"><span class="post-author"><a href="/" title="Author" rel=" author" class="author"><i class="fas fa-user-circle fa-fw"></i>作者</a></span>&nbsp;<span class="post-category">出版于  <a href="/categories/qtwidget%E8%87%AA%E7%BB%98%E6%8E%A7%E4%BB%B6/"><i class="far fa-folder fa-fw"></i>QtWidget自绘控件</a></span></div>
                <div class="post-meta-line"><span><i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime="2022-08-27">2022-08-27</time></span>&nbsp;<span><i class="fas fa-pencil-alt fa-fw"></i>&nbsp;约 762 字</span>&nbsp;
                    <span><i class="far fa-clock fa-fw"></i>&nbsp;预计阅读 2 分钟</span>&nbsp;</div>
            </div>
            
            <hr><div class="details toc" id="toc-static"  data-kept="">
                    <div class="details-summary toc-title">
                        <span>目录</span>
                        <span><i class="details-icon fas fa-angle-right"></i></span>
                    </div>
                    <div class="details-content toc-content" id="toc-content-static"><nav id="TableOfContents">
  <ul>
    <li><a href="#1qpainter">1、QPainter</a></li>
    <li><a href="#2像素刻度尺水平方向">2、像素刻度尺(水平方向)</a></li>
    <li><a href="#3像素刻度尺垂直方向">3、像素刻度尺(垂直方向)</a></li>
    <li><a href="#4完整代码">4、完整代码</a></li>
  </ul>
</nav></div>
                </div><div class="content" id="content"><h2 id="1qpainter">1、QPainter</h2>
<p><strong>在QTWidget中，通常通过QPainter以及QPaintEvent(绘图事件)来完成自绘控件。</strong></p>
<p><strong>QPainter提供了高度优化的功能来完成大多数图形<a href="https://so.csdn.net/so/search?q=GUI&amp;spm=1001.2101.3001.7020" target="_blank" rel="noopener noreffer">GUI</a>程序所需的工作。它可以画从简单的线条到复杂的形状。它还可以绘制对齐的文本和像素图。QPainter可以对继承QPaintDevice类的任何对象进行操作。</strong></p>
<p><strong>QPainter与QPaintDevice和QPaintEngine类一起构成了Qt绘制系统的基础。QPainter是用于执行绘图操作的类。QPaintDevice表示可以使用QPainter在其上绘制的设备。QPaintEngine提供了一个接口，画家可以使用这个接口来绘制不同类型的设备。</strong></p>
<h2 id="2像素刻度尺水平方向">2、像素刻度尺(水平方向)</h2>
<p>我们在绘制像素刻度尺时，只需要重写QWidget中的paintEvent事件即可，在paintEvent中进行绘制操作，首先我们要知道刻度尺的样子和特征，刻度尺每的刻度为5的倍数时要比其他刻度长一点，这也是最关键的部分，我们只需要计算每个刻度连线刻度中两点的坐标即可，最后在5的倍数的刻度上写入数字，就完成了。</p>
<p>像素刻度尺水平方向代码如下：</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-CPP" data-lang="CPP">	<span class="n">QPainter</span> <span class="nf">painter</span><span class="p">(</span><span class="k">this</span><span class="p">);</span>
    <span class="k">auto</span> <span class="n">rect</span><span class="o">=</span><span class="n">event</span><span class="o">-&gt;</span><span class="n">rect</span><span class="p">();</span>
    <span class="c1">//设置抗锯齿
</span><span class="c1"></span>    <span class="n">painter</span><span class="p">.</span><span class="n">setRenderHints</span><span class="p">(</span><span class="n">QPainter</span><span class="o">::</span><span class="n">Antialiasing</span> <span class="o">|</span> <span class="n">QPainter</span><span class="o">::</span><span class="n">TextAntialiasing</span><span class="p">,</span><span class="nb">true</span><span class="p">);</span>
    <span class="n">painter</span><span class="p">.</span><span class="n">fillRect</span><span class="p">(</span><span class="n">rect</span><span class="p">,</span><span class="n">QBrush</span><span class="p">(</span><span class="n">background</span><span class="p">));</span>
    <span class="c1">//绘制刻度
</span><span class="c1"></span>    <span class="n">painter</span><span class="p">.</span><span class="n">save</span><span class="p">();</span>
    <span class="k">auto</span> <span class="n">length</span><span class="o">=</span><span class="p">(</span><span class="n">m_orientation</span><span class="o">==</span><span class="n">Qt</span><span class="o">::</span><span class="n">Horizontal</span><span class="o">?</span> <span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="p">()</span><span class="o">:</span> <span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="p">());</span>
    <span class="n">painter</span><span class="p">.</span><span class="n">setPen</span><span class="p">(</span><span class="n">QPen</span><span class="p">(</span><span class="n">textColor</span><span class="p">,</span><span class="mi">1</span><span class="p">));</span>
    <span class="n">painter</span><span class="p">.</span><span class="n">setFont</span><span class="p">(</span><span class="n">font</span><span class="p">);</span>
    <span class="c1">//水平像素刻度尺
</span><span class="c1"></span>    <span class="k">if</span><span class="p">(</span><span class="n">m_orientation</span><span class="o">==</span><span class="n">Qt</span><span class="o">::</span><span class="n">Horizontal</span><span class="p">)</span>
    <span class="p">{</span>
        <span class="k">auto</span> <span class="n">height</span><span class="o">=</span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="p">();</span>
        <span class="k">auto</span> <span class="n">short_Line</span><span class="o">=</span><span class="n">height</span><span class="o">*</span><span class="mf">0.75</span><span class="p">;</span>
        <span class="k">auto</span> <span class="n">long_Line</span><span class="o">=</span><span class="n">height</span><span class="o">*</span><span class="mf">0.5</span><span class="p">;</span>
        <span class="k">auto</span> <span class="n">middle_Line</span><span class="o">=</span><span class="n">height</span><span class="o">*</span><span class="mf">0.625</span><span class="p">;</span>
        <span class="kt">int</span> <span class="n">temp</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span>
        <span class="k">for</span><span class="p">(</span><span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span><span class="n">i</span><span class="o">&lt;</span><span class="n">length</span><span class="p">;</span><span class="n">i</span><span class="o">+=</span><span class="mi">10</span><span class="p">)</span>
        <span class="p">{</span>
            <span class="k">if</span><span class="p">(</span><span class="n">temp</span><span class="o">%</span><span class="mi">10</span><span class="o">==</span><span class="mi">0</span><span class="p">)</span>
            <span class="p">{</span>
                <span class="n">painter</span><span class="p">.</span><span class="n">drawLine</span><span class="p">(</span><span class="n">QPointF</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">middle_Line</span><span class="p">),</span><span class="n">QPointF</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">height</span><span class="p">));</span>
            <span class="p">}</span>
            <span class="k">else</span> <span class="nf">if</span><span class="p">(</span><span class="n">temp</span><span class="o">%</span><span class="mi">5</span><span class="o">==</span><span class="mi">0</span><span class="p">)</span>
            <span class="p">{</span>
                <span class="n">painter</span><span class="p">.</span><span class="n">drawLine</span><span class="p">(</span><span class="n">QPointF</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">long_Line</span><span class="p">),</span><span class="n">QPointF</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">height</span><span class="p">));</span>
                <span class="n">painter</span><span class="p">.</span><span class="n">drawText</span><span class="p">(</span><span class="n">QRect</span><span class="p">(</span><span class="n">i</span><span class="o">-</span><span class="mi">50</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">100</span><span class="p">,</span><span class="mi">50</span><span class="p">),</span><span class="n">Qt</span><span class="o">::</span><span class="n">AlignCenter</span> <span class="o">|</span> <span class="n">Qt</span><span class="o">::</span><span class="n">TextWordWrap</span><span class="p">,</span>
                                 <span class="n">QString</span><span class="o">::</span><span class="n">number</span><span class="p">(</span><span class="n">i</span><span class="p">));</span>
            <span class="p">}</span>
            <span class="k">else</span>
            <span class="p">{</span>
                <span class="n">painter</span><span class="p">.</span><span class="n">drawLine</span><span class="p">(</span><span class="n">QPointF</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">short_Line</span><span class="p">),</span><span class="n">QPointF</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">height</span><span class="p">));</span>
            <span class="p">}</span>
            <span class="o">++</span><span class="n">temp</span><span class="p">;</span>
        <span class="p">}</span>
    <span class="p">}</span>
</code></pre></div><p>代码测试结果如下：</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="C:%5cUsers%5c86181%5cAppData%5cRoaming%5cTypora%5ctypora-user-images%5cimage-20220827163043738.png"
        data-srcset="C:%5cUsers%5c86181%5cAppData%5cRoaming%5cTypora%5ctypora-user-images%5cimage-20220827163043738.png, C:%5cUsers%5c86181%5cAppData%5cRoaming%5cTypora%5ctypora-user-images%5cimage-20220827163043738.png 1.5x, C:%5cUsers%5c86181%5cAppData%5cRoaming%5cTypora%5ctypora-user-images%5cimage-20220827163043738.png 2x"
        data-sizes="auto"
        alt="C:\Users\86181\AppData\Roaming\Typora\typora-user-images\image-20220827163043738.png"
        title="image-20220827163043738" /></p>
<h2 id="3像素刻度尺垂直方向">3、像素刻度尺(垂直方向)</h2>
<p>和之前一样，只需找到坐标，然后从最开始的刻度开始，每次绘制到5倍数的刻度，就让那个刻度线的长度稍微长一点即可。</p>
<p>垂直刻度尺的代码如下：</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-CPP" data-lang="CPP"><span class="c1">//垂直像素刻度尺
</span><span class="c1"></span>    <span class="k">else</span>
    <span class="p">{</span>
        <span class="k">auto</span> <span class="n">width</span><span class="o">=</span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="p">();</span>
        <span class="k">auto</span> <span class="n">short_Line</span><span class="o">=</span><span class="n">width</span><span class="o">*</span><span class="mf">0.25</span><span class="p">;</span>
        <span class="k">auto</span> <span class="n">long_Line</span><span class="o">=</span><span class="n">width</span><span class="o">*</span><span class="mf">0.5</span><span class="p">;</span>
        <span class="k">auto</span> <span class="n">middle_Line</span><span class="o">=</span><span class="n">width</span><span class="o">*</span><span class="mf">0.375</span><span class="p">;</span>
        <span class="kt">int</span> <span class="n">temp</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span>
        <span class="k">for</span><span class="p">(</span><span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span><span class="n">i</span><span class="o">&lt;</span><span class="n">length</span><span class="p">;</span><span class="n">i</span><span class="o">+=</span><span class="mi">10</span><span class="p">)</span>
        <span class="p">{</span>
            <span class="k">if</span><span class="p">(</span><span class="n">temp</span><span class="o">%</span><span class="mi">10</span><span class="o">==</span><span class="mi">0</span><span class="p">)</span>
            <span class="p">{</span>
                <span class="n">painter</span><span class="p">.</span><span class="n">drawLine</span><span class="p">(</span><span class="n">QPointF</span><span class="p">(</span><span class="n">middle_Line</span><span class="p">,</span><span class="n">i</span><span class="p">),</span><span class="n">QPointF</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="n">i</span><span class="p">));</span>
            <span class="p">}</span>
            <span class="k">else</span> <span class="nf">if</span><span class="p">(</span><span class="n">temp</span><span class="o">%</span><span class="mi">5</span><span class="o">==</span><span class="mi">0</span><span class="p">)</span>
            <span class="p">{</span>
                <span class="n">painter</span><span class="p">.</span><span class="n">drawLine</span><span class="p">(</span><span class="n">QPointF</span><span class="p">(</span><span class="n">long_Line</span><span class="p">,</span><span class="n">i</span><span class="p">),</span><span class="n">QPointF</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="n">i</span><span class="p">));</span>
                <span class="n">painter</span><span class="p">.</span><span class="n">drawText</span><span class="p">(</span><span class="n">QRect</span><span class="p">(</span><span class="n">width</span><span class="o">/</span><span class="mi">2</span><span class="p">,</span><span class="n">i</span><span class="o">-</span><span class="mi">50</span><span class="p">,</span><span class="n">width</span><span class="o">/</span><span class="mi">2</span><span class="p">,</span><span class="mi">100</span><span class="p">),</span><span class="n">Qt</span><span class="o">::</span><span class="n">AlignCenter</span> <span class="o">|</span> <span class="n">Qt</span><span class="o">::</span><span class="n">TextWordWrap</span><span class="p">,</span>
                                 <span class="n">QString</span><span class="o">::</span><span class="n">number</span><span class="p">(</span><span class="n">i</span><span class="p">));</span>
            <span class="p">}</span>
            <span class="k">else</span>
            <span class="p">{</span>
                <span class="n">painter</span><span class="p">.</span><span class="n">drawLine</span><span class="p">(</span><span class="n">QPointF</span><span class="p">(</span><span class="n">short_Line</span><span class="p">,</span><span class="n">i</span><span class="p">),</span><span class="n">QPointF</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="n">i</span><span class="p">));</span>
            <span class="p">}</span>
            <span class="o">++</span><span class="n">temp</span><span class="p">;</span>
        <span class="p">}</span>
    <span class="p">}</span>
    <span class="n">painter</span><span class="p">.</span><span class="n">restore</span><span class="p">();</span>
    <span class="n">QWidget</span><span class="o">::</span><span class="n">paintEvent</span><span class="p">(</span><span class="n">event</span><span class="p">);</span>
</code></pre></div><p>代码测试结果如下：</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://raw.githubusercontent.com/jjking20010901/typora/master/img202208271636767.png"
        data-srcset="https://raw.githubusercontent.com/jjking20010901/typora/master/img202208271636767.png, https://raw.githubusercontent.com/jjking20010901/typora/master/img202208271636767.png 1.5x, https://raw.githubusercontent.com/jjking20010901/typora/master/img202208271636767.png 2x"
        data-sizes="auto"
        alt="https://raw.githubusercontent.com/jjking20010901/typora/master/img202208271636767.png"
        title="image-20220827163609683" /></p>
<h2 id="4完整代码">4、完整代码</h2>
<p>我已经将像素刻度尺的完整代码上传到我的gitee上面，需要的可自取。</p>
<p><a href="https://gitee.com/GoodNightZoe/rule.git" target="_blank" rel="noopener noreffer">QtWidget像素刻度尺</a></p>
</div><div class="post-footer" id="post-footer">
    <div class="post-info"><div class="post-info-tag"><span><a href="/tags/%E5%83%8F%E7%B4%A0%E5%88%BB%E5%BA%A6%E5%B0%BA/">像素刻度尺</a>
                </span></div><div class="post-info-line"><div class="post-info-mod">
                <span>更新于 2022-08-27</span>
            </div><div class="post-info-mod"></div>
        </div><div class="post-info-share">
            <span><a href="javascript:void(0);" title="分享到 Twitter" data-sharer="twitter" data-url="https://acking-you.gitee.io/posts/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA/" data-title="像素刻度尺" data-hashtags="像素刻度尺"><i class="fab fa-twitter fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Facebook" data-sharer="facebook" data-url="https://acking-you.gitee.io/posts/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA/" data-hashtag="像素刻度尺"><i class="fab fa-facebook-square fa-fw"></i></a><a href="javascript:void(0);" title="分享到 WhatsApp" data-sharer="whatsapp" data-url="https://acking-you.gitee.io/posts/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA/" data-title="像素刻度尺" data-web><i class="fab fa-whatsapp fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Line" data-sharer="line" data-url="https://acking-you.gitee.io/posts/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA/" data-title="像素刻度尺"><i class="fab fa-line fa-fw"></i></a><a href="javascript:void(0);" title="分享到 微博" data-sharer="weibo" data-url="https://acking-you.gitee.io/posts/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA/" data-title="像素刻度尺" data-image="https://w.wallhaven.cc/full/dg/wallhaven-dgv23j.png"><i class="fab fa-weibo fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Myspace" data-sharer="myspace" data-url="https://acking-you.gitee.io/posts/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA/" data-title="像素刻度尺" data-description="像素刻度尺"><i data-svg-src="/lib/simple-icons/icons/myspace.min.svg"></i></a><a href="javascript:void(0);" title="分享到 Blogger" data-sharer="blogger" data-url="https://acking-you.gitee.io/posts/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA/" data-title="像素刻度尺" data-description="像素刻度尺"><i class="fab fa-blogger fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Evernote" data-sharer="evernote" data-url="https://acking-you.gitee.io/posts/%C3%A5%C3%A7-%C3%A5%C3%A5%C2%BA%C3%A5%C2%BA/" data-title="像素刻度尺"><i class="fab fa-evernote fa-fw"></i></a></span>
        </div></div><div class="post-nav"><a href="/posts/%C3%A6%C3%A4%C3%A5%C3%A9/" class="prev" rel="prev" title="条件变量"><i class="fas fa-angle-left fa-fw"></i>Previous Post</a>
            <a href="/posts/%C3%A6%C3%A8%C3%A4%C2%AA%C3%A8%C3%A7/" class="next" rel="next" title="汽车仪表盘">Next Post<i class="fas fa-angle-right fa-fw"></i></a></div></div>
</div></article></div>
            </main>
            <footer class="footer"><div class="footer-container"><div class="footer-line">由 <a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo 0.86.0">Hugo</a> 强力驱动 | 主题 - <a href="https://github.com/khusika/FeelIt" target="_blank" rel="noopener noreffer" title="FeelIt 1.0.1"><i class="fas fa-hand-holding-heart fa-fw"></i> FeelIt</a>
        </div><div class="footer-line" itemscope itemtype="http://schema.org/CreativeWork"><i class="far fa-copyright fa-fw"></i><span itemprop="copyrightYear">2022</span><span class="author" itemprop="copyrightHolder">&nbsp;<a href="/"></a></span></div>
</div>
</footer>
        </div>

        <div id="fixed-buttons"><a href="#" id="back-to-top" class="fixed-button" title="回到顶部">
                <i class="fas fa-chevron-up fa-fw"></i>
            </a></div><link rel="stylesheet" href="/lib/fontawesome-free/all.min.css"><link rel="stylesheet" href="/lib/animate/animate.min.css"><link rel="stylesheet" href="/lib/katex/katex.min.css"><link rel="stylesheet" href="/lib/katex/copy-tex.min.css"><script src="/lib/autocomplete/autocomplete.min.js"></script><script src="/lib/lunr/lunr.min.js"></script><script src="/lib/lunr/lunr.stemmer.support.min.js"></script><script src="/lib/lunr/lunr.zh.min.js"></script><script src="/lib/lazysizes/lazysizes.min.js"></script><script src="/lib/clipboard/clipboard.min.js"></script><script src="/lib/sharer/sharer.min.js"></script><script src="/lib/katex/katex.min.js"></script><script src="/lib/katex/auto-render.min.js"></script><script src="/lib/katex/copy-tex.min.js"></script><script src="/lib/katex/mhchem.min.js"></script><script>window.config={"code":{"copyTitle":"复制到剪贴板","maxShownLines":200},"comment":{},"math":{"delimiters":[{"display":true,"left":"$$","right":"$$"},{"display":true,"left":"\\[","right":"\\]"},{"display":false,"left":"$","right":"$"},{"display":false,"left":"\\(","right":"\\)"}],"strict":false},"search":{"highlightTag":"em","lunrIndexURL":"/index.json","lunrLanguageCode":"zh","lunrSegmentitURL":"/lib/lunr/lunr.segmentit.js","maxResultLength":100,"noResultsFound":"没有找到结果","snippetLength":50,"type":"lunr"}};</script><script src="/js/theme.min.js"></script></body></html>
